{foreach from=$form.elements key=name item=element}
	{if isset($form.errors[$name])}
	<p class="error">{$form.errors[$name]}</p>
	{/if}
	<p>
		<label for="{$name}">{$element.caption}:{if $element.required} <span class="required">*</span>{/if}</label>
		{include file="component/form/"|cat:$element.template|cat:".tpl"}
	</p>
{/foreach}
